      SUBROUTINE WRITECOMMON 
      use mod_iop
      use mod_symm
      use mod_orbit
      use mod_size
C
      implicit none 
C
      integer isymoff(8,8,8), irrepa(255,8), irpdpd(8,22), iintfp
      integer nmax, i, j, k, ioff(2), iflags(100)      
      NOCCO(1) = NOA; NOCCO(2) = NOB 
      NVRTO(1) = NVA; NVRTO(2) = NVB 
      POP(1:8,1) = popa; POP(1:8,2) = popb
      VRT(1:8,1) = vrta; VRT(1:8,2) = vrtb
!
!      nirrep = 1 
      ilnbuf = 1800
      iprcln = 32768 
      iprcwd = 4096
      ichcsz = 4096
      ISYMV = 1
      DIRPRD(1,1) = 1
!      ICRSIZ = NMAX
!
      OPEN(UNIT=1000, FILE='cc_interface', FORM='UNFORMATTED')
      REWIND 1000
      WRITE(1000) NOCCO(1), NOCCO(2), NVRTO(1), NVRTO(2)
      WRITE(1000) (((ISYMOFF(I,J,K),I=1,8),J=1,8),K=1,25)
      WRITE(1000) ((POP(I,J),I=1,8),J=1,2)
      WRITE(1000) ((VRT(I,J),I=1,8),J=1,2)
      WRITE(1000) SYMRX, SYMRY, SYMRZ
      WRITE(1000) ISYMV
      WRITE(1000) ((IRREPA(I,J),I=1,255),J=1,2)
      WRITE(1000) ((DIRPRD(I,J),I=1,8),J=1,8)
      WRITE(1000) ((IRPDPD(I,J),I=1,8),J=1,22)
      WRITE(1000)  NIRREP, IINTFP
      write(1000)  ilnbuf, iprcln, iprcwd
      write(1000)  ICRSIZ,ICHCSZ,(IOFF(i),i=1,2)
      write(1000) (IFLAGS(i),i=1,100)
      CLOSE(1000)
C      write(6,*)'sym get by initial',symrx, symry, symrz
C      write(6,*)'icrsiz', icrsiz
      END
  
